home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / MosaicSRC / libwww2 / HTAlert.c < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  1.5 KB  |  75 lines

  1. /*    Displaying messages and getting input for LineMode Browser
  2. **    ==========================================================
  3. **
  4. **    REPLACE THIS MODULE with a GUI version in a GUI environment!
  5. **
  6. ** History:
  7. **       Jun 92 Created May 1992 By C.T. Barker
  8. **       Feb 93 Simplified, portablised (ha!) TBL
  9. **
  10. */
  11.  
  12.  
  13. #include "HTAlert.h"
  14.  
  15. #include "tcp.h"        /* for TOUPPER */
  16. #include <ctype.h>         /* for toupper - should be in tcp.h */
  17.  
  18. extern void mo_gui_notify_progress (char *);
  19. extern int mo_gui_check_icon (int);
  20. extern void mo_gui_clear_icon (void);
  21.  
  22. PUBLIC void HTAlert ARGS1(CONST char *, Msg)
  23. {
  24.   mo_gui_notify_progress (Msg);
  25.   return;
  26. }
  27.  
  28. PUBLIC void HTProgress ARGS1(CONST char *, Msg)
  29. {
  30.   mo_gui_notify_progress (Msg);
  31.   return;
  32. }
  33.  
  34. PUBLIC int HTCheckActiveIcon ARGS1(int, twirl)
  35. {
  36.   int ret;
  37.  
  38.   ret = mo_gui_check_icon (twirl);
  39.   return(ret);
  40. }
  41.  
  42. PUBLIC void HTClearActiveIcon NOARGS
  43. {
  44.   mo_gui_clear_icon ();
  45.   return;
  46. }
  47.  
  48. PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg)
  49. {
  50.   extern int prompt_for_yes_or_no (char *);
  51.  
  52.   if (prompt_for_yes_or_no (Msg))
  53.     return(YES);
  54.   else
  55.     return(NO);
  56. }
  57.  
  58. PUBLIC char * HTPrompt ARGS2(CONST char *, Msg, CONST char *, deflt)
  59. {
  60.   extern char *prompt_for_string (char *);
  61.   char *Tmp = prompt_for_string (Msg);
  62.   char *rep = 0;
  63.  
  64.   StrAllocCopy (rep, (Tmp && *Tmp) ? Tmp : deflt);
  65.   return rep;
  66. }
  67.  
  68. PUBLIC char * HTPromptPassword ARGS1(CONST char *, Msg)
  69. {
  70.   extern char *prompt_for_password (char *);
  71.   char *Tmp = prompt_for_password (Msg);
  72.  
  73.   return Tmp;
  74. }
  75.